<?php
	header('Access-Control-Allow-Origin:*');
    $username = $_GET['username'];
    $password = $_GET['password'];
    $con = new mysqli("127.0.0.1", "root", "", "accounting");
    $con->query("SET NAMES 'utf8'");
    $checkSQL = "select * from user where nickname = '$username' and password = '$password'";
    $res = $con->query($checkSQL);
    //获取记录行数
    $line = mysqli_fetch_assoc($res);
    if($line){
        echo json_encode($line);
    }
    else{
        echo "0";
    }
    exit;
?>